cmake_minimum_required(VERSION 3.0)
project(project_cerr)
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}") # -O3

find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${OpenCV_LIBRARY_DIRS})

find_package(OpenCV REQUIRED)

find_package(glog REQUIRED)
include_directories(${GLOG_INCLUDE_DIRS})
find_package(Boost REQUIRED system)
find_package(yaml-cpp REQUIRED)

find_package(Eigen REQUIRED)
include_directories(${EIGEN_INCLUDE_DIR})

include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/src)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)

file(GLOB PARSE_PATH src/*.cpp)
add_library(${PROJECT_NAME} STATIC ${PARSE_PATH} )
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES} ${OpenCV_LIBS} yaml-cpp ${GLOG_LIBRARIES})

add_executable(projection_cerr_test main.cpp)
target_link_libraries(projection_cerr_test ${PROJECT_NAME} 
                        ${PCL_LIBRARIES} ${OpenCV_LIBS} yaml-cpp ${GLOG_LIBRARIES})
